package com.xinqi.modules.prepare.video.service;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.Param;
import com.xinqi.modules.prepare.common.dto.data.PrepareVideoData;
import com.xinqi.modules.prepare.video.dto.req.PrepareVideoPointCreateDTO;
import com.xinqi.modules.prepare.video.dto.req.PrepareVideoPointDeleteDTO;
import com.xinqi.modules.prepare.video.dto.req.PrepareVideoPointQueryDTO;
import com.xinqi.modules.prepare.video.dto.req.PrepareVideoPointUpdateDTO;
import com.xinqi.modules.prepare.video.dto.rsp.PrepareVideoPointResultDTO;

import javax.validation.Valid;
import java.util.List;

/**
 * 备课区互动视频环节服务层
 *
 * @author: system
 * @date: 2023/03/19
 */
public interface PrepareVideoPointService {
    /**
     * 分页查询 备课区互动视频环节数据
     */
    PageInfo<PrepareVideoPointResultDTO> page(Param pageable, PrepareVideoPointQueryDTO query);

    /**
     * 查询 备课区互动视频环节数据
     */
    List<PrepareVideoPointResultDTO> find(PrepareVideoPointQueryDTO query);

    /**
     * 根据id查询 备课区互动视频环节数据
     */
    PrepareVideoPointResultDTO findById(Long id);

    /**
     * 新增 备课区互动视频环节数据
     */
    Long insert(@Valid PrepareVideoPointCreateDTO dto);

    void insert(Long prepareId, Long videoId, List<PrepareVideoData.PrepareVideoPointData> pointList);

    /**
     * 根据id修改 备课区互动视频环节数据
     */
    Boolean updateById(@Valid PrepareVideoPointUpdateDTO dto);

    /**
     * 根据id删除 备课区互动视频环节数据
     */
    Boolean deleteById(Long id);

    /**
     * 根据id删除 备课区互动视频环节数据
     */
    Boolean deleteById(PrepareVideoPointDeleteDTO dto);

    Boolean deleteByVideoId(Long videoId);
}
